package com.kexilo.core.common.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 防抖配置
 * 
 * @author Kexilo
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "kexilo.debounce")
public class DebounceConfig {
    
    /**
     * 是否启用防抖检查
     */
    private boolean enabled = true;
    
    /**
     * 默认防抖间隔（秒）
     */
    private long defaultInterval = 3;
    
    /**
     * 默认错误消息
     */
    private String defaultMessage = "操作过于频繁，请稍后再试";
    
    /**
     * 全局key前缀
     */
    private String globalPrefix = "debounce:";
    
    /**
     * 是否记录日志
     */
    private boolean logEnabled = true;
    
    /**
     * 是否在完成后删除key
     */
    private boolean deleteAfterCompletion = true;
}
